<!DOCTYPE html><html><head>
      <title>DerucciH5_SDK使⽤参考</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      
      <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css">
      
      
      
      
      
      <style>
      code[class*=language-],pre[class*=language-]{color:#333;background:0 0;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.4;-moz-tab-size:8;-o-tab-size:8;tab-size:8;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:.8em;overflow:auto;border-radius:3px;background:#f5f5f5}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal;background:#f5f5f5}.token.blockquote,.token.comment{color:#969896}.token.cdata{color:#183691}.token.doctype,.token.macro.property,.token.punctuation,.token.variable{color:#333}.token.builtin,.token.important,.token.keyword,.token.operator,.token.rule{color:#a71d5d}.token.attr-value,.token.regex,.token.string,.token.url{color:#183691}.token.atrule,.token.boolean,.token.code,.token.command,.token.constant,.token.entity,.token.number,.token.property,.token.symbol{color:#0086b3}.token.prolog,.token.selector,.token.tag{color:#63a35c}.token.attr-name,.token.class,.token.class-name,.token.function,.token.id,.token.namespace,.token.pseudo-class,.token.pseudo-element,.token.url-reference .token.variable{color:#795da3}.token.entity{cursor:help}.token.title,.token.title .token.punctuation{font-weight:700;color:#1d3e81}.token.list{color:#ed6a43}.token.inserted{background-color:#eaffea;color:#55a532}.token.deleted{background-color:#ffecec;color:#bd2c00}.token.bold{font-weight:700}.token.italic{font-style:italic}.language-json .token.property{color:#183691}.language-markup .token.tag .token.punctuation{color:#333}.language-css .token.function,code.language-css{color:#0086b3}.language-yaml .token.atrule{color:#63a35c}code.language-yaml{color:#183691}.language-ruby .token.function{color:#333}.language-markdown .token.url{color:#795da3}.language-makefile .token.symbol{color:#795da3}.language-makefile .token.variable{color:#183691}.language-makefile .token.builtin{color:#0086b3}.language-bash .token.keyword{color:#0086b3}pre[data-line]{position:relative;padding:1em 0 1em 3em}pre[data-line] .line-highlight-wrapper{position:absolute;top:0;left:0;background-color:transparent;display:block;width:100%}pre[data-line] .line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}pre[data-line] .line-highlight:before,pre[data-line] .line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:#f4f1ef;font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px #fff}pre[data-line] .line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}html body{font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif;font-size:16px;line-height:1.6;color:#333;background-color:#fff;overflow:initial;box-sizing:border-box;word-wrap:break-word}html body>:first-child{margin-top:0}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{line-height:1.2;margin-top:1em;margin-bottom:16px;color:#000}html body h1{font-size:2.25em;font-weight:300;padding-bottom:.3em}html body h2{font-size:1.75em;font-weight:400;padding-bottom:.3em}html body h3{font-size:1.5em;font-weight:500}html body h4{font-size:1.25em;font-weight:600}html body h5{font-size:1.1em;font-weight:600}html body h6{font-size:1em;font-weight:600}html body h1,html body h2,html body h3,html body h4,html body h5{font-weight:600}html body h5{font-size:1em}html body h6{color:#5c5c5c}html body strong{color:#000}html body del{color:#5c5c5c}html body a:not([href]){color:inherit;text-decoration:none}html body a{color:#08c;text-decoration:none}html body a:hover{color:#00a3f5;text-decoration:none}html body img{max-width:100%}html body>p{margin-top:0;margin-bottom:16px;word-wrap:break-word}html body>ol,html body>ul{margin-bottom:16px}html body ol,html body ul{padding-left:2em}html body ol.no-list,html body ul.no-list{padding:0;list-style-type:none}html body ol ol,html body ol ul,html body ul ol,html body ul ul{margin-top:0;margin-bottom:0}html body li{margin-bottom:0}html body li.task-list-item{list-style:none}html body li>p{margin-top:0;margin-bottom:0}html body .task-list-item-checkbox{margin:0 .2em .25em -1.8em;vertical-align:middle}html body .task-list-item-checkbox:hover{cursor:pointer}html body blockquote{margin:16px 0;font-size:inherit;padding:0 15px;color:#5c5c5c;background-color:#f0f0f0;border-left:4px solid #d6d6d6}html body blockquote>:first-child{margin-top:0}html body blockquote>:last-child{margin-bottom:0}html body hr{height:4px;margin:32px 0;background-color:#d6d6d6;border:0 none}html body table{margin:10px 0 15px 0;border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}html body table th{font-weight:700;color:#000}html body table td,html body table th{border:1px solid #d6d6d6;padding:6px 13px}html body dl{padding:0}html body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}html body dl dd{padding:0 16px;margin-bottom:16px}html body code{font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:.85em;color:#000;background-color:#f0f0f0;border-radius:3px;padding:.2em 0}html body code::after,html body code::before{letter-spacing:-.2em;content:'\00a0'}html body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:0 0;border:0}html body .highlight{margin-bottom:16px}html body .highlight pre,html body pre{padding:1em;overflow:auto;line-height:1.45;border:#d6d6d6;border-radius:3px}html body .highlight pre{margin-bottom:0;word-break:normal}html body pre code,html body pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}html body pre code:after,html body pre code:before,html body pre tt:after,html body pre tt:before{content:normal}html body blockquote,html body dl,html body ol,html body p,html body pre,html body ul{margin-top:0;margin-bottom:16px}html body kbd{color:#000;border:1px solid #d6d6d6;border-bottom:2px solid #c7c7c7;padding:2px 4px;background-color:#f0f0f0;border-radius:3px}@media print{html body{background-color:#fff}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{color:#000;page-break-after:avoid}html body blockquote{color:#5c5c5c}html body pre{page-break-inside:avoid}html body table{display:table}html body img{display:block;max-width:100%;max-height:100%}html body code,html body pre{word-wrap:break-word;white-space:pre}}.markdown-preview{width:100%;height:100%;box-sizing:border-box}.markdown-preview ul{list-style:disc}.markdown-preview ul ul{list-style:circle}.markdown-preview ul ul ul{list-style:square}.markdown-preview ol{list-style:decimal}.markdown-preview ol ol,.markdown-preview ul ol{list-style-type:lower-roman}.markdown-preview ol ol ol,.markdown-preview ol ul ol,.markdown-preview ul ol ol,.markdown-preview ul ul ol{list-style-type:lower-alpha}.markdown-preview .newpage,.markdown-preview .pagebreak{page-break-before:always}.markdown-preview pre.line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}.markdown-preview pre.line-numbers>code{position:relative}.markdown-preview pre.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:1em;font-size:100%;left:0;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-preview pre.line-numbers .line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.markdown-preview pre.line-numbers .line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.markdown-preview .mathjax-exps .MathJax_Display{text-align:center!important}.markdown-preview:not([data-for=preview]) .code-chunk .code-chunk-btn-group{display:none}.markdown-preview:not([data-for=preview]) .code-chunk .status{display:none}.markdown-preview:not([data-for=preview]) .code-chunk .output-div{margin-bottom:16px}.markdown-preview .md-toc{padding:0}.markdown-preview .md-toc .md-toc-link-wrapper .md-toc-link{display:inline;padding:.25rem 0}.markdown-preview .md-toc .md-toc-link-wrapper .md-toc-link div,.markdown-preview .md-toc .md-toc-link-wrapper .md-toc-link p{display:inline}.markdown-preview .md-toc .md-toc-link-wrapper.highlighted .md-toc-link{font-weight:800}.scrollbar-style::-webkit-scrollbar{width:8px}.scrollbar-style::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.scrollbar-style::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,.66);border:4px solid rgba(150,150,150,.66);background-clip:content-box}html body[for=html-export]:not([data-presentation-mode]){position:relative;width:100%;height:100%;top:0;left:0;margin:0;padding:0;overflow:auto}html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{position:relative;top:0;min-height:100vh}@media screen and (min-width:914px){html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{padding:2em calc(50% - 457px + 2em)}}@media screen and (max-width:914px){html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{font-size:14px!important;padding:1em}}@media print{html body[for=html-export]:not([data-presentation-mode]) #sidebar-toc-btn{display:none}}html body[for=html-export]:not([data-presentation-mode]) #sidebar-toc-btn{position:fixed;bottom:8px;left:8px;font-size:28px;cursor:pointer;color:inherit;z-index:99;width:32px;text-align:center;opacity:.4}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] #sidebar-toc-btn{opacity:1}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc{position:fixed;top:0;left:0;width:300px;height:100%;padding:32px 0 48px 0;font-size:14px;box-shadow:0 0 4px rgba(150,150,150,.33);box-sizing:border-box;overflow:auto;background-color:inherit}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar{width:8px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,.66);border:4px solid rgba(150,150,150,.66);background-clip:content-box}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc a{text-decoration:none}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc{padding:0 16px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper .md-toc-link{display:inline;padding:.25rem 0}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper .md-toc-link div,html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper .md-toc-link p{display:inline}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper.highlighted .md-toc-link{font-weight:800}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{left:300px;width:calc(100% - 300px);padding:2em calc(50% - 457px - 300px / 2);margin:0;box-sizing:border-box}@media screen and (max-width:1274px){html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{width:100%}}html body[for=html-export]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .markdown-preview{left:50%;transform:translateX(-50%)}html body[for=html-export]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .md-sidebar-toc{display:none}
/* Please visit the URL below for more information: */
/*   https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */

      </style>
      <!-- The content below will be included at the end of the <head> element. --><script type="text/javascript">
  document.addEventListener("DOMContentLoaded", function () {
    // your code here
  });
</script></head><body for="html-export">
    
    
      <div class="crossnote markdown-preview  ">
      
<h1 id="derucci-h5-sdk-使用参考">Derucci H5 SDK 使用参考 </h1>
<p>版本：0.0.1<br>
修改时间：2025年07月12日16:46:59</p>

<div class="md-toc">
<details style="padding:0;;padding-left:0px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#derucci-h5-sdk-使用参考" class="md-toc-link"><p>Derucci H5 SDK 使用参考</p>
</a>
          </summary>
        <div>
          <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#引入sdk文件" class="md-toc-link"><p>引入SDK文件</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#步骤1复制sdk文件到项目" class="md-toc-link">
            <p>步骤1：复制SDK文件到项目</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#步骤2在mainjs中导入sdk" class="md-toc-link">
            <p>步骤2：在main.js中导入SDK</p>

          </a></div>
        </div>
      </details>
    <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#sdk调用参考" class="md-toc-link"><p>SDK调用参考</p>
</a>
          </summary>
        <div>
          <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#连接设备的慕思云mqtt服务" class="md-toc-link"><p>连接设备的慕思云MQTT服务</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#接口定义" class="md-toc-link">
            <p>接口定义</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#调用示例" class="md-toc-link">
            <p>调用示例</p>

          </a></div>
        </div>
      </details>
    <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#注册mqtt消息事件监听器用于接收来自设备的实时数据" class="md-toc-link"><p>注册MQTT消息事件监听器，用于接收来自设备的实时数据</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#接口定义-1" class="md-toc-link">
            <p>接口定义</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#调用方式" class="md-toc-link">
            <p>调用方式</p>

          </a></div>
        </div>
      </details>
    <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#移除之前注册的mqtt消息事件监听器" class="md-toc-link"><p>移除之前注册的MQTT消息事件监听器</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#接口定义-2" class="md-toc-link">
            <p>接口定义</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#调用方式-1" class="md-toc-link">
            <p>调用方式</p>

          </a></div>
        </div>
      </details>
    <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#设置日志打印模式控制sdk的调试日志输出功能便于开发调试和问题排查" class="md-toc-link"><p>设置日志打印模式控制SDK的调试日志输出功能，便于开发调试和问题排查</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#接口定义-3" class="md-toc-link">
            <p>接口定义</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#调用方式-2" class="md-toc-link">
            <p>调用方式</p>

          </a></div>
        </div>
      </details>
    <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#配置sdk运行的目标环境不同环境对应不同的服务端地址和配置" class="md-toc-link"><p>配置SDK运行的目标环境，不同环境对应不同的服务端地址和配置</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#接口定义-4" class="md-toc-link">
            <p>接口定义</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#调用方式-3" class="md-toc-link">
            <p>调用方式</p>

          </a></div>
        </div>
      </details>
    <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#日报告-通过报告id获取报告详情" class="md-toc-link"><p>日报告-通过报告ID获取报告详情</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#接口定义-5" class="md-toc-link">
            <p>接口定义</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#响应参数" class="md-toc-link">
            <p>响应参数</p>

          </a></div>
        </div>
      </details>
    <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#日报告-获取指定日期设备最新报告" class="md-toc-link"><p>日报告-获取指定日期设备最新报告</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#接口定义-6" class="md-toc-link">
            <p>接口定义</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#响应参数-1" class="md-toc-link">
            <p>响应参数</p>

          </a></div>
        </div>
      </details>
    <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#日报告-获取设备日历统计数据" class="md-toc-link"><p>日报告-获取设备日历统计数据</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#接口定义-7" class="md-toc-link">
            <p>接口定义</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#响应参数-2" class="md-toc-link">
            <p>响应参数</p>

          </a></div>
        </div>
      </details>
    <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#日报告-生成报告" class="md-toc-link"><p>日报告-生成报告</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#接口定义-8" class="md-toc-link">
            <p>接口定义</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#响应参数-3" class="md-toc-link">
            <p>响应参数</p>

          </a></div>
        </div>
      </details>
    <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#周月报告-通过报告id获取报告详情" class="md-toc-link"><p>周月报告-通过报告ID获取报告详情</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#接口定义-9" class="md-toc-link">
            <p>接口定义</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#响应参数-4" class="md-toc-link">
            <p>响应参数</p>

          </a></div>
        </div>
      </details>
    <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#周月报告-获取指定日期设备最新报告" class="md-toc-link"><p>周月报告-获取指定日期设备最新报告</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#接口定义-10" class="md-toc-link">
            <p>接口定义</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#响应参数-5" class="md-toc-link">
            <p>响应参数</p>

          </a></div>
        </div>
      </details>
    <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#周月报告-获取设备日历统计数据" class="md-toc-link"><p>周月报告-获取设备日历统计数据</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#接口定义-11" class="md-toc-link">
            <p>接口定义</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#响应参数-6" class="md-toc-link">
            <p>响应参数</p>

          </a></div>
        </div>
      </details>
    <details style="padding:0;;padding-left:24px;" open="">
        <summary class="md-toc-link-wrapper">
          <a href="#根据性别-年龄-身高-体重获取调节数据" class="md-toc-link"><p>根据性别、年龄、身高、体重获取调节数据</p>
</a>
          </summary>
        <div>
          <div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#接口定义-12" class="md-toc-link">
            <p>接口定义</p>

          </a></div><div class="md-toc-link-wrapper" style="padding:0;;display:list-item;list-style:square;margin-left:42px">
          <a href="#调用示例-1" class="md-toc-link">
            <p>调用示例</p>

          </a></div>
        </div>
      </details>
    
        </div>
      </details>
    
        </div>
      </details>
    
</div>
<h2 id="引入sdk文件">引入SDK文件 </h2>
<h3 id="步骤1复制sdk文件到项目">步骤1：复制SDK文件到项目 </h3>
<p>将 <code>derucci.js</code> 文件复制到您的Vue项目的 <code>src</code> 目录下：</p>
<pre data-role="codeBlock" data-info="" class="language-text"><code>vue-project/
├── src/
│ ├── main.js
│ ├── derucci.js ✅ 请将SDK文件复制到这里
...
</code></pre><blockquote>
<p><strong>提示</strong>：确保文件直接放在 <code>src</code> 目录下，而不是子目录中，以保证后续导入正常工作。</p>
</blockquote>
<h3 id="步骤2在mainjs中导入sdk">步骤2：在main.js中导入SDK </h3>
<p>在项目的 <code>main.js</code> 文件中添加以下导入语句：</p>
<pre data-role="codeBlock" data-info="js" class="language-javascript js"><code><span class="token comment">// 导入Derucci SDK</span>
<span class="token comment">// 导入后，window对象将自动挂载derucci对象</span>
<span class="token comment">// 您可以通过derucci对象调用所有SDK方法</span>
<span class="token comment">// 例如：设置SDK环境：derucci.setEnv("test");</span>
<span class="token keyword module keyword-import">import</span> <span class="token string">"./derucci.js"</span><span class="token punctuation">;</span>
</code></pre><h2 id="sdk调用参考">SDK调用参考 </h2>
<h3 id="连接设备的慕思云mqtt服务">连接设备的慕思云MQTT服务 </h3>
<h4 id="接口定义">接口定义 </h4>
<pre data-role="codeBlock" data-info="ts" class="language-ts ts"><code>derucci<span class="token punctuation">.</span><span class="token function">connectToMqtt</span><span class="token punctuation">(</span>deviceId<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword keyword-void">void</span>
</code></pre><h4 id="调用示例">调用示例 </h4>
<pre data-role="codeBlock" data-info="json" class="language-json json"><code><span class="token comment">// 示例：连接设备ID为"B0818425F0AC"的MQTT服务</span>
derucci.connectToMqtt(<span class="token string">"B0818425F0AC"</span>);
</code></pre><h3 id="注册mqtt消息事件监听器用于接收来自设备的实时数据">注册MQTT消息事件监听器，用于接收来自设备的实时数据 </h3>
<h4 id="接口定义-1">接口定义 </h4>
<pre data-role="codeBlock" data-info="ts" class="language-ts ts"><code>derucci<span class="token punctuation">.</span><span class="token function">addMqttEventListener</span><span class="token punctuation">(</span>type<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">,</span> listener<span class="token operator">:</span> <span class="token builtin">Function</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword keyword-void">void</span>
</code></pre><h4 id="调用方式">调用方式 </h4>
<pre data-role="codeBlock" data-info="js" class="language-javascript js"><code><span class="token comment">// 示例1：监听所有MQTT消息</span>
<span class="token keyword keyword-function">function</span> <span class="token function">callback</span><span class="token punctuation">(</span><span class="token parameter">data</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token console class-name">console</span><span class="token punctuation">.</span><span class="token method function property-access">log</span><span class="token punctuation">(</span><span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">收到数据：</span><span class="token template-punctuation string">`</span></span><span class="token punctuation">,</span> data<span class="token punctuation">)</span><span class="token punctuation">;</span> 
<span class="token punctuation">}</span><span class="token punctuation">;</span>
derucci<span class="token punctuation">.</span><span class="token method function property-access">addMqttEventListener</span><span class="token punctuation">(</span><span class="token string">"*"</span><span class="token punctuation">,</span> callback<span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// 示例2：监听心率呼吸数据 事件类型为：“t10ProHwzxRtDataNotify”</span>
<span class="token comment">// function callback(data) { }</span>
<span class="token comment">// derucci.addMqttEventListener("t10ProHwzxRtDataNotify", callback);</span>
</code></pre><h3 id="移除之前注册的mqtt消息事件监听器">移除之前注册的MQTT消息事件监听器 </h3>
<h4 id="接口定义-2">接口定义 </h4>
<pre data-role="codeBlock" data-info="ts" class="language-ts ts"><code>derucci<span class="token punctuation">.</span><span class="token function">removeMqttEventListener</span><span class="token punctuation">(</span>type<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">,</span> listener<span class="token operator">:</span> <span class="token builtin">Function</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword keyword-void">void</span>
</code></pre><h4 id="调用方式-1">调用方式 </h4>
<pre data-role="codeBlock" data-info="js" class="language-javascript js"><code><span class="token comment">// 示例：移除之前添加的全局消息监听器</span>
<span class="token keyword keyword-function">function</span> <span class="token function">callback</span><span class="token punctuation">(</span><span class="token parameter">data</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token console class-name">console</span><span class="token punctuation">.</span><span class="token method function property-access">log</span><span class="token punctuation">(</span><span class="token string">'收到MQTT消息:'</span><span class="token punctuation">,</span> data<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">// 先添加监听器</span>
derucci<span class="token punctuation">.</span><span class="token method function property-access">addMqttEventListener</span><span class="token punctuation">(</span><span class="token string">"*"</span><span class="token punctuation">,</span> callback<span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// 当不再需要时移除监听器</span>
derucci<span class="token punctuation">.</span><span class="token method function property-access">removeMqttEventListener</span><span class="token punctuation">(</span><span class="token string">"*"</span><span class="token punctuation">,</span> callback<span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre><h3 id="设置日志打印模式控制sdk的调试日志输出功能便于开发调试和问题排查">设置日志打印模式控制SDK的调试日志输出功能，便于开发调试和问题排查 </h3>
<h4 id="接口定义-3">接口定义 </h4>
<pre data-role="codeBlock" data-info="ts" class="language-ts ts"><code>derucci<span class="token punctuation">.</span><span class="token function">setDebugMode</span><span class="token punctuation">(</span>isDebug<span class="token operator">:</span> <span class="token builtin">boolean</span> <span class="token operator">|</span> <span class="token keyword keyword-undefined">undefined</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword keyword-void">void</span>
</code></pre><h4 id="调用方式-2">调用方式 </h4>
<pre data-role="codeBlock" data-info="js" class="language-javascript js"><code><span class="token comment">// 开启调试日志</span>
derucci<span class="token punctuation">.</span><span class="token method function property-access">setDebugMode</span><span class="token punctuation">(</span><span class="token boolean">true</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// 关闭调试日志</span>
derucci<span class="token punctuation">.</span><span class="token method function property-access">setDebugMode</span><span class="token punctuation">(</span><span class="token boolean">false</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre><h3 id="配置sdk运行的目标环境不同环境对应不同的服务端地址和配置">配置SDK运行的目标环境，不同环境对应不同的服务端地址和配置 </h3>
<h4 id="接口定义-4">接口定义 </h4>
<pre data-role="codeBlock" data-info="ts" class="language-ts ts"><code>derucci<span class="token punctuation">.</span><span class="token function">setEnv</span><span class="token punctuation">(</span>env<span class="token operator">:</span> <span class="token string">"prod"</span> <span class="token operator">|</span> <span class="token string">"test"</span> <span class="token operator">|</span> <span class="token string">"dev"</span> <span class="token operator">|</span> <span class="token string">"uat"</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword keyword-void">void</span>
</code></pre><h4 id="调用方式-3">调用方式 </h4>
<pre data-role="codeBlock" data-info="js" class="language-javascript js"><code><span class="token comment">// 设置为测试环境</span>
derucci<span class="token punctuation">.</span><span class="token method function property-access">setEnv</span><span class="token punctuation">(</span><span class="token string">"test"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// 设置为用户验收测试环境</span>
<span class="token comment">// derucci.setEnv("uat");</span>

<span class="token comment">// 使用生产环境(默认值，可不显式设置)</span>
<span class="token comment">// derucci.setEnv("prod");</span>
</code></pre><h3 id="日报告-通过报告id获取报告详情">日报告-通过报告ID获取报告详情 </h3>
<h4 id="接口定义-5">接口定义 </h4>
<pre data-role="codeBlock" data-info="ts" class="language-ts ts"><code>derucci<span class="token punctuation">.</span><span class="token function">getDaySleepById</span><span class="token punctuation">(</span>params<span class="token operator">:</span> <span class="token punctuation">{</span>
  docId<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span>      <span class="token comment">// 报告唯一标识符</span>
  machineUniqueCode<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span>  <span class="token comment">// 设备唯一标识符通过将设备码与左右侧标识拼接而成，格式为“设备码####left” 和 “设备码####right”（例如：ABCDEFG####left 和 ABCDEFG####right）</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token builtin">Promise</span><span class="token punctuation">;</span>
</code></pre><h4 id="响应参数">响应参数 </h4>
<pre data-role="codeBlock" data-info="json" class="language-json json"><code><span class="token punctuation">{</span>
    <span class="token property">"code"</span><span class="token operator">:</span> <span class="token number">200</span><span class="token punctuation">,</span>
    <span class="token property">"data"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">"afterSleepResultId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\后一个Id
        <span class="token property">"baseSleepResult"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\基础睡眠报告属性
            <span class="token property">"createAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\报告的入库存储时刻
            <span class="token property">"generateAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\报告生成的时刻
            <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\报告ID
            <span class="token property">"invalidType"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\异常分类
            <span class="token property">"leaveBedAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\离开床的时刻
            <span class="token property">"machineCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\设备码
            <span class="token property">"machineEntityPartCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\设备分体编码
            <span class="token property">"onBedAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\开始躺床上的时刻
            <span class="token property">"sleepEndAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\结束睡眠的时刻
            <span class="token property">"sleepStartAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\进入睡眠的时刻
            <span class="token property">"status"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>        \\是否有效
            <span class="token property">"user"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\用户信息
                <span class="token property">"account"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"addr"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"avatar"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"birthday"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"createAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"dtype"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"mail"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"mobile"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"mpOpenID"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"nickname"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"pwd"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"pwdExpireTime"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"pwdHashEncodeMethod"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"registerMethod"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"registerSource"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"roles"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                    <span class="token punctuation">{</span>
                        <span class="token property">"ancestorList"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                            <span class="token punctuation">{</span>
                                <span class="token property">"ancestorList"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                                    <span class="token punctuation">{</span><span class="token punctuation">}</span>
                                <span class="token punctuation">]</span><span class="token punctuation">,</span>
                                <span class="token property">"createAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                                <span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                                <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                                <span class="token property">"parentId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                                <span class="token property">"rdec"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                                <span class="token property">"show"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                                <span class="token property">"status"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                                <span class="token property">"title"</span><span class="token operator">:</span> <span class="token string">""</span>
                            <span class="token punctuation">}</span>
                        <span class="token punctuation">]</span><span class="token punctuation">,</span>
                        <span class="token property">"createAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                        <span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                        <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                        <span class="token property">"parentId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                        <span class="token property">"rdec"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                        <span class="token property">"show"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                        <span class="token property">"status"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                        <span class="token property">"title"</span><span class="token operator">:</span> <span class="token string">""</span>
                    <span class="token punctuation">}</span>
                <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token property">"sex"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                <span class="token property">"socialID"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"status"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                <span class="token property">"subscribeFlag"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"unionID"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"updateAt"</span><span class="token operator">:</span> <span class="token string">""</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"breathRateModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\呼吸率模块
            <span class="token property">"baseList"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\原始图表<span class="token punctuation">,</span>数据间隔<span class="token operator">:</span><span class="token number">1</span>分钟
                <span class="token property">"attrId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"healthResultAttr"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                    <span class="token property">"alias"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"orderNo"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"show"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                    <span class="token property">"valueType"</span><span class="token operator">:</span> <span class="token number">0</span>
                <span class="token punctuation">}</span><span class="token punctuation">,</span>
                <span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"resultId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"value"</span><span class="token operator">:</span> <span class="token string">""</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"maxRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\最大 次/分
            <span class="token property">"meanRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\平均 次/分
            <span class="token property">"minRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\最小 次/分
            <span class="token property">"refMaxRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\参考最大 次/分
            <span class="token property">"refMinRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\参考最小 次/分
            <span class="token property">"statList"</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>        \\统计图表<span class="token punctuation">,</span>数据间隔<span class="token operator">:</span><span class="token number">20</span>分钟
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"deepAnalysisModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\深入分析模型模块
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"items"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\列表项目
                <span class="token punctuation">{</span>
                    <span class="token property">"circleState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\属性评价<span class="token punctuation">,</span>如睡眠阶段状态<span class="token operator">:</span><span class="token number">0</span>(偏低) <span class="token number">1</span>(正常) <span class="token number">2</span>(偏高)
                    <span class="token property">"circleStateLevel"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\属性评价级别：<span class="token number">1</span>：INFO级别<span class="token punctuation">,</span>绿色，<span class="token number">2</span>：WARN级别<span class="token punctuation">,</span>蓝色，<span class="token number">3</span>：ERROR级别<span class="token punctuation">,</span>红色
                    <span class="token property">"circleStateText"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\属性评价文本<span class="token punctuation">,</span>如偏低、正常、偏高等
                    <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
                    <span class="token property">"duration"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\属性值大小<span class="token punctuation">,</span>如睡眠时长等
                    <span class="token property">"explain"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\属性解读
                    <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\中文属性名
                    <span class="token property">"referValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\参考值文本
                    <span class="token property">"title"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\英文属性名
                    <span class="token property">"valueText"</span><span class="token operator">:</span> <span class="token string">""</span>        \\属性值文本<span class="token punctuation">,</span>从duration转换而来<span class="token punctuation">,</span>并带上单位表示<span class="token punctuation">,</span>如睡眠时长为<span class="token number">8</span>小时<span class="token number">20</span>分
                <span class="token punctuation">}</span>
            <span class="token punctuation">]</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"explainModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\报告解读模块
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"reportExplain"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\每日解读
            <span class="token property">"reportSuggest"</span><span class="token operator">:</span> <span class="token string">""</span>        \\每日建议
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"healthWarningModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\健康预警模块
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"items"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\列表项目
                <span class="token punctuation">{</span>
                    <span class="token property">"circleState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"circleStateLevel"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"circleStateText"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"duration"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"explain"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"referValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"title"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"valueText"</span><span class="token operator">:</span> <span class="token string">""</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">]</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"heartRateModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\心率模块
            <span class="token property">"baseList"</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">,</span>        \\原始图表<span class="token punctuation">,</span>数据间隔<span class="token operator">:</span><span class="token number">1</span>分钟
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"maxRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\最大 次/分
            <span class="token property">"meanRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\平均 次/分
            <span class="token property">"minRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\最小 次/分
            <span class="token property">"refMaxRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\参考最大 次/分
            <span class="token property">"refMinRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\参考最小 次/分
            <span class="token property">"statList"</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>        \\统计图表<span class="token punctuation">,</span>数据间隔<span class="token operator">:</span><span class="token number">20</span>分钟
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"machineName"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\设备名称(含分区，如：T10智能床垫<span class="token number">001</span>|左侧)
        <span class="token property">"preSleepResultId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\前一个Id
        <span class="token property">"scoreModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\评分模块
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"score"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\睡眠评分
            <span class="token property">"scoreCompYest"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\睡眠评分与昨日对比<span class="token operator">:</span>正值表示上涨<span class="token punctuation">,</span>负值表示下降<span class="token punctuation">,</span>空值时无需显示该字段
            <span class="token property">"scoreDesc"</span><span class="token operator">:</span> <span class="token string">""</span>        \\睡眠质量分数描述
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"sleepStateModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\睡眠阶段模块
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"items"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\睡眠分析
                <span class="token punctuation">{</span>
                    <span class="token property">"circleState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\属性评价<span class="token punctuation">,</span>如睡眠阶段状态<span class="token operator">:</span><span class="token number">0</span>(偏低) <span class="token number">1</span>(正常) <span class="token number">2</span>(偏高)
                    <span class="token property">"circleStateLevel"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\属性评价级别：<span class="token number">1</span>：INFO级别<span class="token punctuation">,</span>绿色，<span class="token number">2</span>：WARN级别<span class="token punctuation">,</span>蓝色，<span class="token number">3</span>：ERROR级别<span class="token punctuation">,</span>红色
                    <span class="token property">"circleStateText"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\属性评价文本<span class="token punctuation">,</span>如偏低、正常、偏高等
                    <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
                    <span class="token property">"duration"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\属性值大小<span class="token punctuation">,</span>如睡眠时长等
                    <span class="token property">"explain"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\属性解读
                    <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\中文属性名
                    <span class="token property">"percent"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\占比，旧版本睡眠时长环状图使用该字段，如：某项睡眠时长占睡眠总时长之比
                    <span class="token property">"referValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\参考值文本
                    <span class="token property">"title"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\英文属性名
                    <span class="token property">"valueText"</span><span class="token operator">:</span> <span class="token string">""</span>        \\属性值文本<span class="token punctuation">,</span>从duration转换而来<span class="token punctuation">,</span>并带上单位表示<span class="token punctuation">,</span>如睡眠时长为<span class="token number">8</span>小时<span class="token number">20</span>分
                <span class="token punctuation">}</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token property">"sleepStage"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\睡眠阶段
                <span class="token punctuation">{</span>
                    <span class="token property">"endAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"resultId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"stage"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"startAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"totalTime"</span><span class="token operator">:</span> <span class="token string">""</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">]</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"template"</span><span class="token operator">:</span> <span class="token string">""</span>        \\报告模版
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">"msg"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span>
</code></pre><h3 id="日报告-获取指定日期设备最新报告">日报告-获取指定日期设备最新报告 </h3>
<h4 id="接口定义-6">接口定义 </h4>
<pre data-role="codeBlock" data-info="ts" class="language-ts ts"><code>derucci<span class="token punctuation">.</span><span class="token function">getDaySleep</span><span class="token punctuation">(</span>params<span class="token operator">:</span> <span class="token punctuation">{</span>
  docDate<span class="token operator">?</span><span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span>          <span class="token comment">// 报告日期，格式为"yyyy/MM/dd"</span>
  machineUniqueCode<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span> <span class="token comment">// 设备唯一标识符通过将设备码与左右侧标识拼接而成，格式为“设备码####left” 和 “设备码####right”（例如：ABCDEFG####left 和 ABCDEFG####right）</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token builtin">Promise</span><span class="token punctuation">;</span>  <span class="token comment">// 返回Promise，解析为日睡眠报告对象</span>
</code></pre><h4 id="响应参数-1">响应参数 </h4>
<pre data-role="codeBlock" data-info="json" class="language-json json"><code><span class="token punctuation">{</span>
    <span class="token property">"code"</span><span class="token operator">:</span> <span class="token number">200</span><span class="token punctuation">,</span>
    <span class="token property">"data"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">"afterSleepResultId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\后一个Id
        <span class="token property">"baseSleepResult"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\基础睡眠报告属性
            <span class="token property">"createAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\报告的入库存储时刻
            <span class="token property">"generateAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\报告生成的时刻
            <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\报告ID
            <span class="token property">"invalidType"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\异常分类
            <span class="token property">"leaveBedAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\离开床的时刻
            <span class="token property">"machineCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\设备码
            <span class="token property">"machineEntityPartCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\设备分体编码
            <span class="token property">"onBedAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\开始躺床上的时刻
            <span class="token property">"sleepEndAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\结束睡眠的时刻
            <span class="token property">"sleepStartAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\进入睡眠的时刻
            <span class="token property">"status"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>        \\是否有效
            <span class="token property">"user"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\用户信息
                <span class="token property">"account"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"addr"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"avatar"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"birthday"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"createAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"dtype"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"mail"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"mobile"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"mpOpenID"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"nickname"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"pwd"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"pwdExpireTime"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"pwdHashEncodeMethod"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"registerMethod"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"registerSource"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"roles"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                    <span class="token punctuation">{</span>
                        <span class="token property">"ancestorList"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                            <span class="token punctuation">{</span>
                                <span class="token property">"ancestorList"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                                    <span class="token punctuation">{</span><span class="token punctuation">}</span>
                                <span class="token punctuation">]</span><span class="token punctuation">,</span>
                                <span class="token property">"createAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                                <span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                                <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                                <span class="token property">"parentId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                                <span class="token property">"rdec"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                                <span class="token property">"show"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                                <span class="token property">"status"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                                <span class="token property">"title"</span><span class="token operator">:</span> <span class="token string">""</span>
                            <span class="token punctuation">}</span>
                        <span class="token punctuation">]</span><span class="token punctuation">,</span>
                        <span class="token property">"createAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                        <span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                        <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                        <span class="token property">"parentId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                        <span class="token property">"rdec"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                        <span class="token property">"show"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                        <span class="token property">"status"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                        <span class="token property">"title"</span><span class="token operator">:</span> <span class="token string">""</span>
                    <span class="token punctuation">}</span>
                <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token property">"sex"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                <span class="token property">"socialID"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"status"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                <span class="token property">"subscribeFlag"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"unionID"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"updateAt"</span><span class="token operator">:</span> <span class="token string">""</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"breathRateModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\呼吸率模块
            <span class="token property">"baseList"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\原始图表<span class="token punctuation">,</span>数据间隔<span class="token operator">:</span><span class="token number">1</span>分钟
                <span class="token property">"attrId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"healthResultAttr"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                    <span class="token property">"alias"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"orderNo"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"show"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                    <span class="token property">"valueType"</span><span class="token operator">:</span> <span class="token number">0</span>
                <span class="token punctuation">}</span><span class="token punctuation">,</span>
                <span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"resultId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"value"</span><span class="token operator">:</span> <span class="token string">""</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"maxRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\最大 次/分
            <span class="token property">"meanRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\平均 次/分
            <span class="token property">"minRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\最小 次/分
            <span class="token property">"refMaxRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\参考最大 次/分
            <span class="token property">"refMinRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\参考最小 次/分
            <span class="token property">"statList"</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>        \\统计图表<span class="token punctuation">,</span>数据间隔<span class="token operator">:</span><span class="token number">20</span>分钟
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"deepAnalysisModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\深入分析模型模块
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"items"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\列表项目
                <span class="token punctuation">{</span>
                    <span class="token property">"circleState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\属性评价<span class="token punctuation">,</span>如睡眠阶段状态<span class="token operator">:</span><span class="token number">0</span>(偏低) <span class="token number">1</span>(正常) <span class="token number">2</span>(偏高)
                    <span class="token property">"circleStateLevel"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\属性评价级别：<span class="token number">1</span>：INFO级别<span class="token punctuation">,</span>绿色，<span class="token number">2</span>：WARN级别<span class="token punctuation">,</span>蓝色，<span class="token number">3</span>：ERROR级别<span class="token punctuation">,</span>红色
                    <span class="token property">"circleStateText"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\属性评价文本<span class="token punctuation">,</span>如偏低、正常、偏高等
                    <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
                    <span class="token property">"duration"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\属性值大小<span class="token punctuation">,</span>如睡眠时长等
                    <span class="token property">"explain"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\属性解读
                    <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\中文属性名
                    <span class="token property">"referValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\参考值文本
                    <span class="token property">"title"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\英文属性名
                    <span class="token property">"valueText"</span><span class="token operator">:</span> <span class="token string">""</span>        \\属性值文本<span class="token punctuation">,</span>从duration转换而来<span class="token punctuation">,</span>并带上单位表示<span class="token punctuation">,</span>如睡眠时长为<span class="token number">8</span>小时<span class="token number">20</span>分
                <span class="token punctuation">}</span>
            <span class="token punctuation">]</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"explainModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\报告解读模块
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"reportExplain"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\每日解读
            <span class="token property">"reportSuggest"</span><span class="token operator">:</span> <span class="token string">""</span>        \\每日建议
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"healthWarningModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\健康预警模块
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"items"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\列表项目
                <span class="token punctuation">{</span>
                    <span class="token property">"circleState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"circleStateLevel"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"circleStateText"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"duration"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"explain"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"referValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"title"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"valueText"</span><span class="token operator">:</span> <span class="token string">""</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">]</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"heartRateModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\心率模块
            <span class="token property">"baseList"</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">,</span>        \\原始图表<span class="token punctuation">,</span>数据间隔<span class="token operator">:</span><span class="token number">1</span>分钟
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"maxRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\最大 次/分
            <span class="token property">"meanRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\平均 次/分
            <span class="token property">"minRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\最小 次/分
            <span class="token property">"refMaxRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\参考最大 次/分
            <span class="token property">"refMinRate"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\参考最小 次/分
            <span class="token property">"statList"</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>        \\统计图表<span class="token punctuation">,</span>数据间隔<span class="token operator">:</span><span class="token number">20</span>分钟
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"machineName"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\设备名称(含分区，如：T10智能床垫<span class="token number">001</span>|左侧)
        <span class="token property">"preSleepResultId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\前一个Id
        <span class="token property">"scoreModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\评分模块
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"score"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\睡眠评分
            <span class="token property">"scoreCompYest"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\睡眠评分与昨日对比<span class="token operator">:</span>正值表示上涨<span class="token punctuation">,</span>负值表示下降<span class="token punctuation">,</span>空值时无需显示该字段
            <span class="token property">"scoreDesc"</span><span class="token operator">:</span> <span class="token string">""</span>        \\睡眠质量分数描述
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"sleepStateModule"</span><span class="token operator">:</span> <span class="token punctuation">{</span>        \\睡眠阶段模块
            <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
            <span class="token property">"items"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\睡眠分析
                <span class="token punctuation">{</span>
                    <span class="token property">"circleState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\属性评价<span class="token punctuation">,</span>如睡眠阶段状态<span class="token operator">:</span><span class="token number">0</span>(偏低) <span class="token number">1</span>(正常) <span class="token number">2</span>(偏高)
                    <span class="token property">"circleStateLevel"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\属性评价级别：<span class="token number">1</span>：INFO级别<span class="token punctuation">,</span>绿色，<span class="token number">2</span>：WARN级别<span class="token punctuation">,</span>蓝色，<span class="token number">3</span>：ERROR级别<span class="token punctuation">,</span>红色
                    <span class="token property">"circleStateText"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\属性评价文本<span class="token punctuation">,</span>如偏低、正常、偏高等
                    <span class="token property">"courseCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠知识跳转页面编码<span class="token punctuation">,</span>为空时表示没有相关数据<span class="token punctuation">,</span>不允许页面跳转
                    <span class="token property">"duration"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\属性值大小<span class="token punctuation">,</span>如睡眠时长等
                    <span class="token property">"explain"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\属性解读
                    <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\中文属性名
                    <span class="token property">"percent"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\占比，旧版本睡眠时长环状图使用该字段，如：某项睡眠时长占睡眠总时长之比
                    <span class="token property">"referValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\参考值文本
                    <span class="token property">"title"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\英文属性名
                    <span class="token property">"valueText"</span><span class="token operator">:</span> <span class="token string">""</span>        \\属性值文本<span class="token punctuation">,</span>从duration转换而来<span class="token punctuation">,</span>并带上单位表示<span class="token punctuation">,</span>如睡眠时长为<span class="token number">8</span>小时<span class="token number">20</span>分
                <span class="token punctuation">}</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token property">"sleepStage"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\睡眠阶段
                <span class="token punctuation">{</span>
                    <span class="token property">"endAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"resultId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"stage"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                    <span class="token property">"startAt"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                    <span class="token property">"totalTime"</span><span class="token operator">:</span> <span class="token string">""</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">]</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">"template"</span><span class="token operator">:</span> <span class="token string">""</span>        \\报告模版
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">"msg"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span>
</code></pre><h3 id="日报告-获取设备日历统计数据">日报告-获取设备日历统计数据 </h3>
<h4 id="接口定义-7">接口定义 </h4>
<pre data-role="codeBlock" data-info="ts" class="language-ts ts"><code>derucci<span class="token punctuation">.</span><span class="token function">getDaySleepCalendar</span><span class="token punctuation">(</span>params<span class="token operator">:</span> <span class="token punctuation">{</span>
  docDate<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span>          <span class="token comment">// 基准日期，格式为"yyyy/MM/dd"(如"2023/01/01" 那么结果就是返回2023年所有的有报告的日期)</span>
  machineUniqueCode<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span> <span class="token comment">// 设备唯一标识符通过将设备码与左右侧标识拼接而成，格式为“设备码####left” 和 “设备码####right”（例如：ABCDEFG####left 和 ABCDEFG####right）</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token builtin">Promise</span><span class="token punctuation">;</span> <span class="token comment">// 返回Promise，解析为日睡眠日历统计数据对象</span>
</code></pre><h4 id="响应参数-2">响应参数 </h4>
<pre data-role="codeBlock" data-info="json" class="language-json json"><code><span class="token punctuation">{</span>
    <span class="token property">"code"</span><span class="token operator">:</span> <span class="token number">200</span><span class="token punctuation">,</span>
    <span class="token property">"data"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
        <span class="token punctuation">{</span>
            <span class="token property">"count"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
            <span class="token property">"date"</span><span class="token operator">:</span> <span class="token string">""</span> <span class="token comment">// 有报告的日期</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token property">"msg"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span>
</code></pre><h3 id="日报告-生成报告">日报告-生成报告 </h3>
<h4 id="接口定义-8">接口定义 </h4>
<pre data-role="codeBlock" data-info="ts" class="language-ts ts"><code>derucci<span class="token punctuation">.</span><span class="token function">dayReportPreForceGenerate</span><span class="token punctuation">(</span>params<span class="token operator">:</span> <span class="token punctuation">{</span>
  machineCode<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span>            <span class="token comment">// 设备码</span>
  machineUniqueCode<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span>      <span class="token comment">// 设备唯一标识符通过将设备码与左右侧标识拼接而成，格式为“设备码####left” 和 “设备码####right”（例如：ABCDEFG####left 和 ABCDEFG####right）</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token builtin">Promise</span><span class="token punctuation">;</span> <span class="token comment">// 返回Promise，解析为周/月睡眠日历统计数据对象</span>
</code></pre><h4 id="响应参数-3">响应参数 </h4>
<pre data-role="codeBlock" data-info="json" class="language-json json"><code><span class="token comment">// 如果返回状态码为200，说明接口请求成功，报告正在生成。</span>
<span class="token comment">// 程序会等待10秒后重新请求当天的报告，检查是否生成成功。</span>
<span class="token comment">// 如果成功生成报告，展示当天的报告；</span>
<span class="token comment">// 如果报告未生成，提示用户当前没有报告数据。</span>
<span class="token comment">//</span>
<span class="token comment">// 如果返回状态码不是200，直接提示接口返回的msg字段，表明报告无法生成。</span>
<span class="token punctuation">{</span>
    <span class="token property">"code"</span><span class="token operator">:</span> <span class="token number">200</span><span class="token punctuation">,</span>
    <span class="token property">"msg"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span>
</code></pre><h3 id="周月报告-通过报告id获取报告详情">周月报告-通过报告ID获取报告详情 </h3>
<h4 id="接口定义-9">接口定义 </h4>
<pre data-role="codeBlock" data-info="ts" class="language-ts ts"><code>derucci<span class="token punctuation">.</span><span class="token function">getWeekMonthSleepById</span><span class="token punctuation">(</span>params<span class="token operator">:</span> <span class="token punctuation">{</span>
  docId<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span>          <span class="token comment">// 报告唯一标识符</span>
  machineUniqueCode<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span> <span class="token comment">// 设备唯一标识符通过将设备码与左右侧标识拼接而成，格式为“设备码####left” 和 “设备码####right”（例如：ABCDEFG####left 和 ABCDEFG####right）</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token builtin">Promise</span><span class="token punctuation">;</span> <span class="token comment">// 返回Promise，解析为周/月睡眠报告对象</span>
</code></pre><h4 id="响应参数-4">响应参数 </h4>
<pre data-role="codeBlock" data-info="json" class="language-json json"><code><span class="token punctuation">{</span>
    <span class="token property">"code"</span><span class="token operator">:</span> <span class="token number">200</span><span class="token punctuation">,</span>
    <span class="token property">"data"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">"afterSleepResultId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\后一个Id
        <span class="token property">"allSleepAnalyseDayVos"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\全国日分析数据
            <span class="token punctuation">{</span>
                <span class="token property">"deepDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡时长 <span class="token number">0207</span>
                <span class="token property">"deepSleepRatio"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比
                <span class="token property">"deepSleepRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比分析结果
                <span class="token property">"enterSleepDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠时长
                <span class="token property">"enterSleepDurationResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠时长分析结果
                <span class="token property">"fallasleepDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时长
                <span class="token property">"fallasleepDurationResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时长分析结果
                <span class="token property">"nr2Duration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\浅睡<span class="token number">2</span>时长 <span class="token number">0207</span>
                <span class="token property">"nrDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\浅睡时长 <span class="token number">0207</span>
                <span class="token property">"remDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境时长 <span class="token number">0207</span>
                <span class="token property">"remRatio"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比
                <span class="token property">"remRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比分析结果
                <span class="token property">"sleepDate"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠日期(报告生成日期)<span class="token punctuation">,</span>格式<span class="token operator">:</span>yyyy/MM/dd
                <span class="token property">"sleepEndTime"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床时间点
                <span class="token property">"sleepEndTimeResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床时间点分析结果
                <span class="token property">"sleepReportScore"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\睡眠报告分数
                <span class="token property">"sleepStartTime"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时间点
                <span class="token property">"sleepStartTimeResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时间点分析结果
                <span class="token property">"wakeDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\觉醒时长 <span class="token number">0207</span>
                <span class="token property">"wakeRatio"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\觉醒占比
                <span class="token property">"wakeRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span>        \\觉醒占比分析结果
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"avgScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\平均睡眠得分 <span class="token number">0207</span>
        <span class="token property">"avgScoreContrast"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\平均睡眠得分较上周期 <span class="token number">0207</span>
        <span class="token property">"awakenLeaveBedCounts"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\觉醒离床次数 <span class="token number">0207</span>
            <span class="token punctuation">{</span>
                <span class="token property">"contrastValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\较上周期 <span class="token number">0207</span>
                <span class="token property">"currentValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\当前值 <span class="token number">0207</span>
                <span class="token property">"itemDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\描术 <span class="token number">0207</span>
                <span class="token property">"itemTitle"</span><span class="token operator">:</span> <span class="token string">""</span>        \\标题 <span class="token number">0207</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"deepSleepNormalMax"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\正常深睡占比最大值
        <span class="token property">"deepSleepNormalMin"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\正常深睡占比最小值
        <span class="token property">"deepSleepRatioAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比本月/周统计
        <span class="token property">"deepSleepRatioDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比描述
        <span class="token property">"deepSleepRatioDescId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比描述id
        <span class="token property">"deepSleepRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比分析结果(<span class="token number">0</span><span class="token operator">:</span> 正常，<span class="token number">1</span>：不足)
        <span class="token property">"deepSleepRatioScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比分数
        <span class="token property">"deepSleeps"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\深睡 <span class="token number">0207</span>
            <span class="token punctuation">{</span>
                <span class="token property">"contrastValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\较上周期 <span class="token number">0207</span>
                <span class="token property">"currentValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\当前值 <span class="token number">0207</span>
                <span class="token property">"itemDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\描术 <span class="token number">0207</span>
                <span class="token property">"itemTitle"</span><span class="token operator">:</span> <span class="token string">""</span>        \\标题 <span class="token number">0207</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"dietAdviceId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\饮食建议id
        <span class="token property">"endDate"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\结束日期，格式<span class="token operator">:</span>yyyy/MM/dd
        <span class="token property">"heartRateWarns"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\心率预警 <span class="token number">0207</span>
            <span class="token punctuation">{</span>
                <span class="token property">"contrastValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\较上周期 <span class="token number">0207</span>
                <span class="token property">"currentValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\当前值 <span class="token number">0207</span>
                <span class="token property">"itemDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\描术 <span class="token number">0207</span>
                <span class="token property">"itemTitle"</span><span class="token operator">:</span> <span class="token string">""</span>        \\标题 <span class="token number">0207</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\主键ID
        <span class="token property">"interpretAdvice"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠解读建议
        <span class="token property">"lastDeepSleepRatioAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比上月/周统计
        <span class="token property">"lastRemRatioAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比上月/周统计
        <span class="token property">"lastSleepDurationAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠时长上月/周统计
        <span class="token property">"lastSleepEndTimeAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床时间点上月/周统计
        <span class="token property">"lastSleepStartTimeAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时间点上月/周统计
        <span class="token property">"machineCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\设备码 周示例报告时固定为example-week<span class="token punctuation">,</span>月示例报告时固定为example-month
        <span class="token property">"machineEntityPartCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\设备分体码
        <span class="token property">"machineName"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\设备名称(含分区，如：T10智能床垫<span class="token number">001</span>|左侧)
        <span class="token property">"periodEndDate"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\统计周期结束日期(周/月的最后一天)，判断报告属于哪个周期，格式<span class="token operator">:</span>yyyy/MM/dd
        <span class="token property">"periodType"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\统计周期可取值为week或month
        <span class="token property">"preSleepResultId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\前一个Id
        <span class="token property">"recommProdId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\推荐产品id列表
        <span class="token property">"remRatioAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比本月/周统计
        <span class="token property">"remRatioDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比描述
        <span class="token property">"remRatioDescId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比描述id
        <span class="token property">"remRatioNormalMax"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\正常梦境占比最大值
        <span class="token property">"remRatioNormalMin"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\正常梦境占比最小值
        <span class="token property">"remRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比分析结果(<span class="token number">0</span><span class="token operator">:</span> 正常，<span class="token number">1</span>：不足)
        <span class="token property">"remRatioScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比分数
        <span class="token property">"rems"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\梦境 <span class="token number">0207</span>
            <span class="token punctuation">{</span>
                <span class="token property">"contrastValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\较上周期 <span class="token number">0207</span>
                <span class="token property">"currentValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\当前值 <span class="token number">0207</span>
                <span class="token property">"itemDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\描术 <span class="token number">0207</span>
                <span class="token property">"itemTitle"</span><span class="token operator">:</span> <span class="token string">""</span>        \\标题 <span class="token number">0207</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"sleepAdviceId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠建议id
        <span class="token property">"sleepAnalyseDayVos"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\日分析数据
            <span class="token punctuation">{</span>
                <span class="token property">"deepDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"deepSleepRatio"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"deepSleepRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"enterSleepDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"enterSleepDurationResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"fallasleepDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"fallasleepDurationResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"nr2Duration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"nrDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"remDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"remRatio"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"remRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"sleepDate"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"sleepEndTime"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"sleepEndTimeResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"sleepReportScore"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"sleepStartTime"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"sleepStartTimeResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"wakeDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"wakeRatio"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"wakeRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"sleepDayCnt"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\睡眠天数
        <span class="token property">"sleepDurationAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠时长本月/周统计
        <span class="token property">"sleepDurationDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠长度描述
        <span class="token property">"sleepDurationDescId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠长度描述id
        <span class="token property">"sleepDurationNormalMax"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\正常睡眠长度最大值
        <span class="token property">"sleepDurationNormalMin"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\正常睡眠长度最小值
        <span class="token property">"sleepDurationResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠时长分析结果(<span class="token number">0</span><span class="token operator">:</span> 正常，<span class="token number">1</span>：偏多，<span class="token number">2</span>：不足)
        <span class="token property">"sleepDurationScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠时长分数
        <span class="token property">"sleepDurations"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\睡眠时长 <span class="token number">0207</span>
            <span class="token punctuation">{</span>
                <span class="token property">"contrastValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\较上周期 <span class="token number">0207</span>
                <span class="token property">"currentValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\当前值 <span class="token number">0207</span>
                <span class="token property">"itemDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\描术 <span class="token number">0207</span>
                <span class="token property">"itemTitle"</span><span class="token operator">:</span> <span class="token string">""</span>        \\标题 <span class="token number">0207</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"sleepEndTimeAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床时间点本月/周统计(逗号分隔<span class="token operator">:</span>早醒<span class="token punctuation">,</span>晚起<span class="token punctuation">,</span>规律)
        <span class="token property">"sleepEndTimeDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床情况描述
        <span class="token property">"sleepEndTimeDescId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床情况描述id
        <span class="token property">"sleepEndTimeResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床时间点分析结果(<span class="token number">0</span><span class="token operator">:</span> 正常，<span class="token number">1</span>：早醒，<span class="token number">2</span>：晚起)
        <span class="token property">"sleepEndTimeScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床时间点分数
        <span class="token property">"sleepPatterns"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\睡眠规律 <span class="token number">0207</span>
            <span class="token punctuation">{</span>
                <span class="token property">"contrastValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\较上周期 <span class="token number">0207</span>
                <span class="token property">"currentValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\当前值 <span class="token number">0207</span>
                <span class="token property">"itemDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\描术 <span class="token number">0207</span>
                <span class="token property">"itemTitle"</span><span class="token operator">:</span> <span class="token string">""</span>        \\标题 <span class="token number">0207</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"sleepQualityLevel"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠情况等级(<span class="token number">0</span>：优秀，<span class="token number">1</span>：良好，<span class="token number">2</span>：一般，<span class="token number">3</span>：差，<span class="token number">4</span>：非常差)
        <span class="token property">"sleepQualityRank"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠情况击败占比
        <span class="token property">"sleepStartTimeAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时间点本月/周统计(逗号分隔<span class="token operator">:</span>熬夜<span class="token punctuation">,</span>按时)
        <span class="token property">"sleepStartTimeDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡情况描述
        <span class="token property">"sleepStartTimeDescId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡情况描述ID
        <span class="token property">"sleepStartTimeResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时长分析结果(<span class="token number">0</span><span class="token operator">:</span> 正常，<span class="token number">1</span>：熬夜)
        <span class="token property">"sleepStartTimeScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时长分数
        <span class="token property">"sportAdviceId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\运动建议id
        <span class="token property">"startDate"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\开始日期，格式<span class="token operator">:</span>yyyy/MM/dd
        <span class="token property">"summaryId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\一句话总结id
        <span class="token property">"totalDeepSleepRatioScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\全国深睡占比分数
        <span class="token property">"totalRemRatioScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\全国梦境占比分数
        <span class="token property">"totalSleepDurationScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\全国睡眠时长分数
        <span class="token property">"totalSleepEndTimeScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\全国起床时间点分数
        <span class="token property">"totalSleepStartTimeScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\全国入睡时间点分数
        <span class="token property">"userId"</span><span class="token operator">:</span> <span class="token number">0</span>        \\用户ID，ALL为总体情况
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">"msg"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span>
</code></pre><h3 id="周月报告-获取指定日期设备最新报告">周月报告-获取指定日期设备最新报告 </h3>
<h4 id="接口定义-10">接口定义 </h4>
<pre data-role="codeBlock" data-info="ts" class="language-ts ts"><code>derucci<span class="token punctuation">.</span><span class="token function">getWeekMonthSleep</span><span class="token punctuation">(</span>params<span class="token operator">:</span> <span class="token punctuation">{</span>
  periodType<span class="token operator">:</span> <span class="token string">"week"</span> <span class="token operator">|</span> <span class="token string">"month"</span><span class="token punctuation">;</span>  <span class="token comment">// 报告周期类型："week"(周报)或"month"(月报)</span>
  docDate<span class="token operator">?</span><span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span>               <span class="token comment">// 基准日期，格式为"yyyy/MM/dd"(如"2023/01/01")</span>
  machineUniqueCode<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span>      <span class="token comment">// 设备唯一标识符通过将设备码与左右侧标识拼接而成，格式为“设备码####left” 和 “设备码####right”（例如：ABCDEFG####left 和 ABCDEFG####right）</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token builtin">Promise</span><span class="token punctuation">;</span> <span class="token comment">// 返回Promise，解析为周/月睡眠报告对象</span>
</code></pre><h4 id="响应参数-5">响应参数 </h4>
<pre data-role="codeBlock" data-info="json" class="language-json json"><code><span class="token punctuation">{</span>
    <span class="token property">"code"</span><span class="token operator">:</span> <span class="token number">200</span><span class="token punctuation">,</span>
    <span class="token property">"data"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">"afterSleepResultId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\后一个Id
        <span class="token property">"allSleepAnalyseDayVos"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\全国日分析数据
            <span class="token punctuation">{</span>
                <span class="token property">"deepDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡时长 <span class="token number">0207</span>
                <span class="token property">"deepSleepRatio"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比
                <span class="token property">"deepSleepRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比分析结果
                <span class="token property">"enterSleepDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠时长
                <span class="token property">"enterSleepDurationResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠时长分析结果
                <span class="token property">"fallasleepDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时长
                <span class="token property">"fallasleepDurationResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时长分析结果
                <span class="token property">"nr2Duration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\浅睡<span class="token number">2</span>时长 <span class="token number">0207</span>
                <span class="token property">"nrDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\浅睡时长 <span class="token number">0207</span>
                <span class="token property">"remDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境时长 <span class="token number">0207</span>
                <span class="token property">"remRatio"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比
                <span class="token property">"remRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比分析结果
                <span class="token property">"sleepDate"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠日期(报告生成日期)<span class="token punctuation">,</span>格式<span class="token operator">:</span>yyyy/MM/dd
                <span class="token property">"sleepEndTime"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床时间点
                <span class="token property">"sleepEndTimeResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床时间点分析结果
                <span class="token property">"sleepReportScore"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\睡眠报告分数
                <span class="token property">"sleepStartTime"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时间点
                <span class="token property">"sleepStartTimeResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时间点分析结果
                <span class="token property">"wakeDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\觉醒时长 <span class="token number">0207</span>
                <span class="token property">"wakeRatio"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\觉醒占比
                <span class="token property">"wakeRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span>        \\觉醒占比分析结果
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"avgScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\平均睡眠得分 <span class="token number">0207</span>
        <span class="token property">"avgScoreContrast"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\平均睡眠得分较上周期 <span class="token number">0207</span>
        <span class="token property">"awakenLeaveBedCounts"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\觉醒离床次数 <span class="token number">0207</span>
            <span class="token punctuation">{</span>
                <span class="token property">"contrastValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\较上周期 <span class="token number">0207</span>
                <span class="token property">"currentValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\当前值 <span class="token number">0207</span>
                <span class="token property">"itemDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\描术 <span class="token number">0207</span>
                <span class="token property">"itemTitle"</span><span class="token operator">:</span> <span class="token string">""</span>        \\标题 <span class="token number">0207</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"deepSleepNormalMax"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\正常深睡占比最大值
        <span class="token property">"deepSleepNormalMin"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\正常深睡占比最小值
        <span class="token property">"deepSleepRatioAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比本月/周统计
        <span class="token property">"deepSleepRatioDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比描述
        <span class="token property">"deepSleepRatioDescId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比描述id
        <span class="token property">"deepSleepRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比分析结果(<span class="token number">0</span><span class="token operator">:</span> 正常，<span class="token number">1</span>：不足)
        <span class="token property">"deepSleepRatioScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比分数
        <span class="token property">"deepSleeps"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\深睡 <span class="token number">0207</span>
            <span class="token punctuation">{</span>
                <span class="token property">"contrastValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\较上周期 <span class="token number">0207</span>
                <span class="token property">"currentValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\当前值 <span class="token number">0207</span>
                <span class="token property">"itemDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\描术 <span class="token number">0207</span>
                <span class="token property">"itemTitle"</span><span class="token operator">:</span> <span class="token string">""</span>        \\标题 <span class="token number">0207</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"dietAdviceId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\饮食建议id
        <span class="token property">"endDate"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\结束日期，格式<span class="token operator">:</span>yyyy/MM/dd
        <span class="token property">"heartRateWarns"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\心率预警 <span class="token number">0207</span>
            <span class="token punctuation">{</span>
                <span class="token property">"contrastValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\较上周期 <span class="token number">0207</span>
                <span class="token property">"currentValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\当前值 <span class="token number">0207</span>
                <span class="token property">"itemDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\描术 <span class="token number">0207</span>
                <span class="token property">"itemTitle"</span><span class="token operator">:</span> <span class="token string">""</span>        \\标题 <span class="token number">0207</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\主键ID
        <span class="token property">"interpretAdvice"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠解读建议
        <span class="token property">"lastDeepSleepRatioAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\深睡占比上月/周统计
        <span class="token property">"lastRemRatioAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比上月/周统计
        <span class="token property">"lastSleepDurationAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠时长上月/周统计
        <span class="token property">"lastSleepEndTimeAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床时间点上月/周统计
        <span class="token property">"lastSleepStartTimeAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时间点上月/周统计
        <span class="token property">"machineCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\设备码 周示例报告时固定为example-week<span class="token punctuation">,</span>月示例报告时固定为example-month
        <span class="token property">"machineEntityPartCode"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\设备分体码
        <span class="token property">"machineName"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\设备名称(含分区，如：T10智能床垫<span class="token number">001</span>|左侧)
        <span class="token property">"periodEndDate"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\统计周期结束日期(周/月的最后一天)，判断报告属于哪个周期，格式<span class="token operator">:</span>yyyy/MM/dd
        <span class="token property">"periodType"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\统计周期可取值为week或month
        <span class="token property">"preSleepResultId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\前一个Id
        <span class="token property">"recommProdId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\推荐产品id列表
        <span class="token property">"remRatioAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比本月/周统计
        <span class="token property">"remRatioDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比描述
        <span class="token property">"remRatioDescId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比描述id
        <span class="token property">"remRatioNormalMax"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\正常梦境占比最大值
        <span class="token property">"remRatioNormalMin"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\正常梦境占比最小值
        <span class="token property">"remRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比分析结果(<span class="token number">0</span><span class="token operator">:</span> 正常，<span class="token number">1</span>：不足)
        <span class="token property">"remRatioScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\梦境占比分数
        <span class="token property">"rems"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\梦境 <span class="token number">0207</span>
            <span class="token punctuation">{</span>
                <span class="token property">"contrastValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\较上周期 <span class="token number">0207</span>
                <span class="token property">"currentValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\当前值 <span class="token number">0207</span>
                <span class="token property">"itemDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\描术 <span class="token number">0207</span>
                <span class="token property">"itemTitle"</span><span class="token operator">:</span> <span class="token string">""</span>        \\标题 <span class="token number">0207</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"sleepAdviceId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠建议id
        <span class="token property">"sleepAnalyseDayVos"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\日分析数据
            <span class="token punctuation">{</span>
                <span class="token property">"deepDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"deepSleepRatio"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"deepSleepRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"enterSleepDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"enterSleepDurationResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"fallasleepDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"fallasleepDurationResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"nr2Duration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"nrDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"remDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"remRatio"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"remRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"sleepDate"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"sleepEndTime"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"sleepEndTimeResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"sleepReportScore"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
                <span class="token property">"sleepStartTime"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"sleepStartTimeResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"wakeDuration"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"wakeRatio"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
                <span class="token property">"wakeRatioResult"</span><span class="token operator">:</span> <span class="token string">""</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"sleepDayCnt"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>        \\睡眠天数
        <span class="token property">"sleepDurationAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠时长本月/周统计
        <span class="token property">"sleepDurationDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠长度描述
        <span class="token property">"sleepDurationDescId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠长度描述id
        <span class="token property">"sleepDurationNormalMax"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\正常睡眠长度最大值
        <span class="token property">"sleepDurationNormalMin"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\正常睡眠长度最小值
        <span class="token property">"sleepDurationResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠时长分析结果(<span class="token number">0</span><span class="token operator">:</span> 正常，<span class="token number">1</span>：偏多，<span class="token number">2</span>：不足)
        <span class="token property">"sleepDurationScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠时长分数
        <span class="token property">"sleepDurations"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\睡眠时长 <span class="token number">0207</span>
            <span class="token punctuation">{</span>
                <span class="token property">"contrastValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\较上周期 <span class="token number">0207</span>
                <span class="token property">"currentValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\当前值 <span class="token number">0207</span>
                <span class="token property">"itemDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\描术 <span class="token number">0207</span>
                <span class="token property">"itemTitle"</span><span class="token operator">:</span> <span class="token string">""</span>        \\标题 <span class="token number">0207</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"sleepEndTimeAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床时间点本月/周统计(逗号分隔<span class="token operator">:</span>早醒<span class="token punctuation">,</span>晚起<span class="token punctuation">,</span>规律)
        <span class="token property">"sleepEndTimeDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床情况描述
        <span class="token property">"sleepEndTimeDescId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床情况描述id
        <span class="token property">"sleepEndTimeResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床时间点分析结果(<span class="token number">0</span><span class="token operator">:</span> 正常，<span class="token number">1</span>：早醒，<span class="token number">2</span>：晚起)
        <span class="token property">"sleepEndTimeScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\起床时间点分数
        <span class="token property">"sleepPatterns"</span><span class="token operator">:</span> <span class="token punctuation">[</span>        \\睡眠规律 <span class="token number">0207</span>
            <span class="token punctuation">{</span>
                <span class="token property">"contrastValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\较上周期 <span class="token number">0207</span>
                <span class="token property">"currentValue"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\当前值 <span class="token number">0207</span>
                <span class="token property">"itemDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\描术 <span class="token number">0207</span>
                <span class="token property">"itemTitle"</span><span class="token operator">:</span> <span class="token string">""</span>        \\标题 <span class="token number">0207</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">"sleepQualityLevel"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠情况等级(<span class="token number">0</span>：优秀，<span class="token number">1</span>：良好，<span class="token number">2</span>：一般，<span class="token number">3</span>：差，<span class="token number">4</span>：非常差)
        <span class="token property">"sleepQualityRank"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\睡眠情况击败占比
        <span class="token property">"sleepStartTimeAnaly"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时间点本月/周统计(逗号分隔<span class="token operator">:</span>熬夜<span class="token punctuation">,</span>按时)
        <span class="token property">"sleepStartTimeDesc"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡情况描述
        <span class="token property">"sleepStartTimeDescId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡情况描述ID
        <span class="token property">"sleepStartTimeResult"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时长分析结果(<span class="token number">0</span><span class="token operator">:</span> 正常，<span class="token number">1</span>：熬夜)
        <span class="token property">"sleepStartTimeScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\入睡时长分数
        <span class="token property">"sportAdviceId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\运动建议id
        <span class="token property">"startDate"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\开始日期，格式<span class="token operator">:</span>yyyy/MM/dd
        <span class="token property">"summaryId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\一句话总结id
        <span class="token property">"totalDeepSleepRatioScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\全国深睡占比分数
        <span class="token property">"totalRemRatioScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\全国梦境占比分数
        <span class="token property">"totalSleepDurationScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\全国睡眠时长分数
        <span class="token property">"totalSleepEndTimeScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\全国起床时间点分数
        <span class="token property">"totalSleepStartTimeScore"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>        \\全国入睡时间点分数
        <span class="token property">"userId"</span><span class="token operator">:</span> <span class="token number">0</span>        \\用户ID，ALL为总体情况
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">"msg"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span>
</code></pre><h3 id="周月报告-获取设备日历统计数据">周月报告-获取设备日历统计数据 </h3>
<h4 id="接口定义-11">接口定义 </h4>
<pre data-role="codeBlock" data-info="ts" class="language-ts ts"><code>derucci<span class="token punctuation">.</span><span class="token function">getWeekMonthSleepCalendar</span><span class="token punctuation">(</span>params<span class="token operator">:</span> <span class="token punctuation">{</span>
  periodType<span class="token operator">:</span> <span class="token string">"week"</span> <span class="token operator">|</span> <span class="token string">"month"</span><span class="token punctuation">;</span>  <span class="token comment">// 报告周期类型："week"(周报)或"month"(月报)</span>
  docDate<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span>                <span class="token comment">// 基准日期，格式为"yyyy/MM/dd"（例如"2023/01/01"），返回2023年所有包含周报或月报的日期。</span>
  machineUniqueCode<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span>      <span class="token comment">// 设备唯一标识符通过将设备码与左右侧标识拼接而成，格式为“设备码####left” 和 “设备码####right”（例如：ABCDEFG####left 和 ABCDEFG####right）</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token builtin">Promise</span><span class="token punctuation">;</span> <span class="token comment">// 返回Promise，解析为周/月睡眠日历统计数据对象</span>
</code></pre><h4 id="响应参数-6">响应参数 </h4>
<pre data-role="codeBlock" data-info="json" class="language-json json"><code><span class="token punctuation">{</span>
    <span class="token property">"code"</span><span class="token operator">:</span> <span class="token number">200</span><span class="token punctuation">,</span>
    <span class="token property">"data"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
        <span class="token punctuation">{</span>
            <span class="token property">"count"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
            <span class="token property">"date"</span><span class="token operator">:</span> <span class="token string">""</span> <span class="token comment">// 有报告的日期</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token property">"msg"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span>
</code></pre><h3 id="根据性别-年龄-身高-体重获取调节数据">根据性别、年龄、身高、体重获取调节数据 </h3>
<h4 id="接口定义-12">接口定义 </h4>
<pre data-role="codeBlock" data-info="ts" class="language-ts ts"><code>derucci<span class="token punctuation">.</span><span class="token function">adjustMatch</span><span class="token punctuation">(</span>params<span class="token operator">:</span> <span class="token punctuation">{</span>
  gender<span class="token operator">:</span> <span class="token string">"male"</span> <span class="token operator">|</span> <span class="token string">"female"</span><span class="token punctuation">;</span>  <span class="token comment">// 用户性别</span>
  age<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">;</span>                <span class="token comment">// 用户年龄(岁) 1900/01/01-当日</span>
  height<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">;</span>             <span class="token comment">// 用户身高(cm) 50-250cm</span>
  weight<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">;</span>             <span class="token comment">// 用户体重(kg) 10-250kg</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>        <span class="token comment">// 解析为调节参数数值数组</span>
</code></pre><h4 id="调用示例-1">调用示例 </h4>
<pre data-role="codeBlock" data-info="js" class="language-javascript js"><code><span class="token keyword keyword-const">const</span> res <span class="token operator">=</span> derucci<span class="token punctuation">.</span><span class="token method function property-access">adjustMatch</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  <span class="token literal-property property">gender</span><span class="token operator">:</span> <span class="token string">"female"</span><span class="token punctuation">,</span>
  <span class="token literal-property property">age</span><span class="token operator">:</span> <span class="token number">30</span><span class="token punctuation">,</span>
  <span class="token literal-property property">height</span><span class="token operator">:</span> <span class="token number">170</span><span class="token punctuation">,</span>
  <span class="token literal-property property">weight</span><span class="token operator">:</span> <span class="token number">65</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span>
<span class="token console class-name">console</span><span class="token punctuation">.</span><span class="token method function property-access">log</span><span class="token punctuation">(</span>res<span class="token punctuation">)</span> <span class="token comment">// [80, 85, 75]</span>
</code></pre><p>end</p>

      </div>
      
      
    
    
    
    
    
    
  
    </body></html>